package com.fishery.refrigeratory.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author wgz
 * @since 2021/1/20
 */

@ApiModel(value = "Refrigeratory对象", description = "冷库信息")
@TableName(value = "t_refrigeratory_info")
public class Refrigeratory implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "冷库id")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "冷库名称")
    @NotEmpty(message = "冷库名称不能为空")
    private String refrigeratoryName;

    @ApiModelProperty(value = "冷库地址")
    @NotEmpty(message = "冷库地址不能为空")
    private String refrigeratoryAddress;

    @ApiModelProperty(value = "冷库面积,单位平方米")
    @NotEmpty(message = "冷库面积不能为空")
    private Integer refrigeratoryArea;

    @ApiModelProperty(value = "冷库地址经度")
    @NotEmpty(message = "冷库地址经度不能为空")
    private String refrigeratoryPositionLongitude;

    @ApiModelProperty(value = "冷库地址纬度")
    @NotEmpty(message = "冷库地址纬度不能为空")
    private String refrigeratoryPositionLatitude;

    @ApiModelProperty(value = "冷库已用容量,单位kg,默认0kg")
    private Double refrigeratoryUsedCapacity;

    @ApiModelProperty(value = "冷库总容量,单位kg")
    @NotEmpty(message = "冷库总容量不能为空且大于0")
    private Double refrigeratoryCapacity;

    @ApiModelProperty(value = "冷库温度,默认0度")
    private Integer refrigeratoryTemperature;

    @ApiModelProperty(value = "冷库介绍")
    private String refrigeratoryIntroduce;

    @ApiModelProperty(value = "创建者id")
    private String createPersonId;

    @ApiModelProperty(value = "基地id")
    private String baseId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @ApiModelProperty(value = "逻辑删除,是1、否0")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "乐观锁")
    @Version
    private Integer version;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRefrigeratoryName() {
        return refrigeratoryName;
    }

    public void setRefrigeratoryName(String refrigeratoryName) {
        this.refrigeratoryName = refrigeratoryName;
    }

    public String getRefrigeratoryAddress() {
        return refrigeratoryAddress;
    }

    public void setRefrigeratoryAddress(String refrigeratoryAddress) {
        this.refrigeratoryAddress = refrigeratoryAddress;
    }

    public Integer getRefrigeratoryArea() {
        return refrigeratoryArea;
    }

    public void setRefrigeratoryArea(Integer refrigeratoryArea) {
        this.refrigeratoryArea = refrigeratoryArea;
    }

    public String getRefrigeratoryPositionLongitude() {
        return refrigeratoryPositionLongitude;
    }

    public void setRefrigeratoryPositionLongitude(String refrigeratoryPositionLongitude) {
        this.refrigeratoryPositionLongitude = refrigeratoryPositionLongitude;
    }

    public String getRefrigeratoryPositionLatitude() {
        return refrigeratoryPositionLatitude;
    }

    public void setRefrigeratoryPositionLatitude(String refrigeratoryPositionLatitude) {
        this.refrigeratoryPositionLatitude = refrigeratoryPositionLatitude;
    }

    public Double getRefrigeratoryUsedCapacity() {
        return refrigeratoryUsedCapacity;
    }

    public void setRefrigeratoryUsedCapacity(Double refrigeratoryUsedCapacity) {
        this.refrigeratoryUsedCapacity = refrigeratoryUsedCapacity;
    }

    public Double getRefrigeratoryCapacity() {
        return refrigeratoryCapacity;
    }

    public void setRefrigeratoryCapacity(Double refrigeratoryCapacity) {
        this.refrigeratoryCapacity = refrigeratoryCapacity;
    }

    public Integer getRefrigeratoryTemperature() {
        return refrigeratoryTemperature;
    }

    public void setRefrigeratoryTemperature(Integer refrigeratoryTemperature) {
        this.refrigeratoryTemperature = refrigeratoryTemperature;
    }

    public String getRefrigeratoryIntroduce() {
        return refrigeratoryIntroduce;
    }

    public void setRefrigeratoryIntroduce(String refrigeratoryIntroduce) {
        this.refrigeratoryIntroduce = refrigeratoryIntroduce;
    }

    public String getCreatePersonId() {
        return createPersonId;
    }

    public void setCreatePersonId(String createPersonId) {
        this.createPersonId = createPersonId;
    }

    public String getBaseId() {
        return baseId;
    }

    public void setBaseId(String baseId) {
        this.baseId = baseId;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "Refrigeratory{" +
                "id='" + id + '\'' +
                ", refrigeratoryName='" + refrigeratoryName + '\'' +
                ", refrigeratoryAddress='" + refrigeratoryAddress + '\'' +
                ", refrigeratoryArea=" + refrigeratoryArea +
                ", refrigeratoryPositionLongitude='" + refrigeratoryPositionLongitude + '\'' +
                ", refrigeratoryPositionLatitude='" + refrigeratoryPositionLatitude + '\'' +
                ", refrigeratoryUsedCapacity=" + refrigeratoryUsedCapacity +
                ", refrigeratoryCapacity=" + refrigeratoryCapacity +
                ", refrigeratoryTemperature=" + refrigeratoryTemperature +
                ", refrigeratoryIntroduce='" + refrigeratoryIntroduce + '\'' +
                ", createPersonId='" + createPersonId + '\'' +
                ", baseId='" + baseId + '\'' +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                ", isDeleted=" + isDeleted +
                ", version=" + version +
                '}';
    }
}